# -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import ValidationError

class EmpOvertime(models.Model):

    _name = 'emp.overtime'
    peo_id = fields.Many2one(comodel_name='emp.peo')
    overtime_detail_ids = fields.One2many(string='加班明細',comodel_name='emp.overtimedetail', inverse_name='overtime_id')



    pautono = fields.Char('人員自動編號')
    formno = fields.Char('補休單號')
    code = fields.Char('申請人職員編號')
    name = fields.Many2one(string='加班申請人',comodel_name='emp.peo')
    dep = fields.Char('服務單位')
    ptitle = fields.Char('職稱')
    year = fields.Char('學年度')
    sess = fields.Char('補休學期')
    yn = fields.Char('是否允許補休')
    created = fields.Datetime('申請日期')
    state = fields.Char('表單狀態')
    sign_status = fields.Char('簽核狀態')
    status = fields.Char('表單狀態')
    effectdate = fields.Datetime('結案日期')
    reason = fields.Text('加班事由')
    expire_date = fields.Datetime('有效期限')
    vstart = fields.Datetime('開始日期')
    vend = fields.Datetime('結束日期')
    vdays = fields.Char('補休天數')
    vhours = fields.Char('補休時數')
    location = fields.Char('地點')
    depno = fields.Char('主要單位')
    document = fields.Char('簽呈公文文號')
    remark = fields.Char('備註')
    type = fields.Char('假別')
    depkind = fields.Char('此部門是行政單位還是教學單位')
    deplevel = fields.Char('請假人單位為一級或二級')
    adminunit = fields.Char('主要單位')
    reason_option = fields.Char('補休原因')
    adminRemark = fields.Char()

